package com.js.foodordersystem.mapper;

import com.js.foodordersystem.entity.OrderItem;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author scj
 * @email scj0725@qq.com
 * @create 2025-01-09 10:52:50
 */
@Repository
public interface OrderItemMapper extends BaseMapper<OrderItem> {

    List<Map<String, Object>> selectAll(@Param("orderItem") OrderItem orderItem, @Param("limit") Integer limit, @Param("page") Integer page);

    Long selectAllCount(@Param("orderItem") OrderItem orderItem);

    List<Map<String, Object>> getAllByOrderId(@Param("orderId") Long orderId);

    List<Long> selectPopularDishIds(int limit);
}

